﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace Memorandum.Views
{
    /// <summary>
    /// ToastMessage.xaml 的交互逻辑
    /// </summary>
    public partial class ToastMessage : Window
    {
        public ToastMessage()
        {
            InitializeComponent();
            this.Loaded += ToastMessage_Loaded;
        }

        private void ToastMessage_Loaded(object sender, RoutedEventArgs e)
        {

            this.Topmost = true;
        }

        public string Title
        {
            get { return (string)GetValue(TitleProperty); }
            set { SetValue(TitleProperty, value); }
        }

        // Using a DependencyProperty as the backing store for Title.  This enables animation, styling, binding, etc...
        public static readonly DependencyProperty TitleProperty =
            DependencyProperty.Register("Title", typeof(string), typeof(ToastMessage), new PropertyMetadata(null));



        public string Content
        {
            get { return (string)GetValue(ContentProperty); }
            set { SetValue(ContentProperty, value); }
        }

        // Using a DependencyProperty as the backing store for Content.  This enables animation, styling, binding, etc...
        public static readonly DependencyProperty ContentProperty =
            DependencyProperty.Register("Content", typeof(string), typeof(ToastMessage), new PropertyMetadata(null));



        public DateTime Datetime
        {
            get { return (DateTime)GetValue(DatetimeProperty); }
            set { SetValue(DatetimeProperty, value); }
        }

        // Using a DependencyProperty as the backing store for Datetime.  This enables animation, styling, binding, etc...
        public static readonly DependencyProperty DatetimeProperty =
            DependencyProperty.Register("Datetime", typeof(DateTime), typeof(ToastMessage), new PropertyMetadata(null));


        private void close_click(object sender, RoutedEventArgs e)
        {
            this.Close();
        }
    }
}
